//
//  PhotoCell.m
//  SportSocial
//
//  Created by yull on 15/1/7.
//  Copyright (c) 2015年 yull. All rights reserved.
//

#import "PhotoCell.h"
#import <UIImageView+WebCache.h>
@implementation PhotoCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.imageView = [[UIImageView alloc] initWithFrame:self.contentView.bounds];
        self.imageView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
        [self.contentView addSubview:self.imageView];
    }
    return self;
}

- (void)drawCellWithUrl:(NSString *)imageUrl
{
    self.imageUrl = imageUrl;
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:imageUrl] placeholderImage:[UIImage imageNamed:@"photo_default"]];
}
@end
